<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 一种开发场景
        const VIDEO = Symbol();
        const AUDIO = Symbol();
        const IMAGE = Symbol();

        function play(status){
            switch(status){
                case VIDEO:{
                    console.log('视频播放');
                    break;
                }
                case AUDIO:{
                    console.log('音频播放');
                    break;
                }
                case IMAGE:{
                    console.log('图片播放');
                    break;
                }
                default:{
                    console.log('failed');
                }
            }
        }
        play(VIDEO);
    </script>
</body>
</html>